SodCashRecordV5
SodCashRecords contain a start-of-day currency position that derived from dividend or corporate action being applied to a prior period position. These records are computed and published by SR rotation servers.
METADATA
Attribute | Value |
---|---|
Topic | 4740-risk-v5 |
MLink Token | ClientRisk |
Product | SRRisk |
accessType | SELECT |
Table Definition
Field | Type | Key | Default Value | Comment |
---|---|---|---|---|
accnt | VARCHAR(16) | PRI | '' | |
currency | enum - Currency | PRI | 'None' | |
tradeDate | DATE | PRI | '1900-01-01' | |
srcTransaction | enum - SrcTransaction | PRI | 'None' | |
srcSecKey_at | enum - AssetType | PRI | 'None' | prior period sec key that this position record derived from if any |
srcSecKey_ts | enum - TickerSrc | PRI | 'None' | prior period sec key that this position record derived from if any |
srcSecKey_tk | VARCHAR(12) | PRI | '' | prior period sec key that this position record derived from if any |
srcSecKey_yr | SMALLINT UNSIGNED | PRI | 0 | prior period sec key that this position record derived from if any |
srcSecKey_mn | TINYINT UNSIGNED | PRI | 0 | prior period sec key that this position record derived from if any |
srcSecKey_dy | TINYINT UNSIGNED | PRI | 0 | prior period sec key that this position record derived from if any |
srcSecKey_xx | DOUBLE | PRI | 0 | prior period sec key that this position record derived from if any |
srcSecKey_cp | enum - CallPut | PRI | 'Call' | prior period sec key that this position record derived from if any |
srcSecType | enum - SpdrKeyType | PRI | 'None' | |
srcTradeDate | DATE | PRI | '1900-01-01' | prior period trade date that this position record derived from |
clientFirm | VARCHAR(16) | PRI | '' | SR assigned client firm |
srCashAmount | DOUBLE | 0 | ||
clrCashAmount | DOUBLE | 0 | ||
comment | TINYTEXT | '' | source description if any | |
timestamp | DATETIME(6) | '1900-01-01 00:00:00.000000' |
PRIMARY KEY DEFINITION (Unique)
Field | Sequence |
---|---|
accnt | 1 |
currency | 2 |
tradeDate | 3 |
srcTransaction | 4 |
srcSecKey_tk | 5 |
srcSecKey_yr | 6 |
srcSecKey_mn | 7 |
srcSecKey_dy | 8 |
srcSecKey_xx | 9 |
srcSecKey_cp | 10 |
srcSecKey_at | 11 |
srcSecKey_ts | 12 |
srcSecType | 13 |
srcTradeDate | 14 |
clientFirm | 15 |
CREATE TABLE EXAMPLE QUERY
CREATE TABLE `SRRisk`.`MsgSodCashRecordV5` (
`accnt` VARCHAR(16) NOT NULL DEFAULT '',
`currency` ENUM('None','AUD','BRL','CAD','CHF','CNH','CNY','EUR','GBP','JPY','KRW','MXN','MYR','NOK','NZD','SEK','TRY','USD','USDCents','CZK','ZAR','HUF','USX','GBX') NOT NULL DEFAULT 'None',
`tradeDate` DATE NOT NULL DEFAULT '1900-01-01',
`srcTransaction` ENUM('None','ExAsTrans','Dividend','CashTakeout','SecLending') NOT NULL DEFAULT 'None',
`srcSecKey_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None' COMMENT 'prior period sec key that this position record derived from (if any)',
`srcSecKey_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None' COMMENT 'prior period sec key that this position record derived from (if any)',
`srcSecKey_tk` VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'prior period sec key that this position record derived from (if any)',
`srcSecKey_yr` SMALLINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'prior period sec key that this position record derived from (if any)',
`srcSecKey_mn` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'prior period sec key that this position record derived from (if any)',
`srcSecKey_dy` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'prior period sec key that this position record derived from (if any)',
`srcSecKey_xx` DOUBLE NOT NULL DEFAULT 0 COMMENT 'prior period sec key that this position record derived from (if any)',
`srcSecKey_cp` ENUM('Call','Put','Pair') NOT NULL DEFAULT 'Call' COMMENT 'prior period sec key that this position record derived from (if any)',
`srcSecType` ENUM('None','Stock','Future','Option','MLeg') NOT NULL DEFAULT 'None',
`srcTradeDate` DATE NOT NULL DEFAULT '1900-01-01' COMMENT 'prior period trade date that this position record derived from',
`clientFirm` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'SR assigned client firm',
`srCashAmount` DOUBLE NOT NULL DEFAULT 0,
`clrCashAmount` DOUBLE NOT NULL DEFAULT 0,
`comment` TINYTEXT NOT NULL DEFAULT '' COMMENT 'source description (if any)',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000',
PRIMARY KEY USING HASH (`accnt`,`currency`,`tradeDate`,`srcTransaction`,`srcSecKey_tk`,`srcSecKey_yr`,`srcSecKey_mn`,`srcSecKey_dy`,`srcSecKey_xx`,`srcSecKey_cp`,`srcSecKey_at`,`srcSecKey_ts`,`srcSecType`,`srcTradeDate`,`clientFirm`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='SodCashRecords contain a start-of-day currency position that derived from dividend or corporate action being applied to a prior period position.\nThese records are computed and published by SR rotation servers.';
SELECT TABLE EXAMPLE QUERY
SELECT
`accnt`,
`currency`,
`tradeDate`,
`srcTransaction`,
`srcSecKey_at`,
`srcSecKey_ts`,
`srcSecKey_tk`,
`srcSecKey_yr`,
`srcSecKey_mn`,
`srcSecKey_dy`,
`srcSecKey_xx`,
`srcSecKey_cp`,
`srcSecType`,
`srcTradeDate`,
`clientFirm`,
`srCashAmount`,
`clrCashAmount`,
`comment`,
`timestamp`
FROM `SRRisk`.`MsgSodCashRecordV5`
WHERE
/* Replace with a VARCHAR(16) */
`accnt` = 'Example_accnt'
AND
/* Replace with a ENUM('None','AUD','BRL','CAD','CHF','CNH','CNY','EUR','GBP','JPY','KRW','MXN','MYR','NOK','NZD','SEK','TRY','USD','USDCents','CZK','ZAR','HUF','USX','GBX') */
`currency` = 'None'
AND
/* Replace with a DATE */
`tradeDate` = '2022-01-01'
AND
/* Replace with a ENUM('None','ExAsTrans','Dividend','CashTakeout','SecLending') */
`srcTransaction` = 'None'
AND
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`srcSecKey_at` = 'None'
AND
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') */
`srcSecKey_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`srcSecKey_tk` = 'Example_srcSecKey_tk'
AND
/* Replace with a SMALLINT UNSIGNED */
`srcSecKey_yr` = 123
AND
/* Replace with a TINYINT UNSIGNED */
`srcSecKey_mn` = 1
AND
/* Replace with a TINYINT UNSIGNED */
`srcSecKey_dy` = 1
AND
/* Replace with a DOUBLE */
`srcSecKey_xx` = 4.56
AND
/* Replace with a ENUM('Call','Put','Pair') */
`srcSecKey_cp` = 'Call'
AND
/* Replace with a ENUM('None','Stock','Future','Option','MLeg') */
`srcSecType` = 'None'
AND
/* Replace with a DATE */
`srcTradeDate` = '2022-01-01'
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';
Doc Columns Query
SELECT * FROM SRRisk.doccolumns WHERE TABLE_NAME='SodCashRecordV5' ORDER BY ordinal_position ASC;